import {
    get,
    post,
    post_json
} from '@/http/axios'


export default {
    namespaced: true,
    state: {
        // 栏目数据
        productData: []
    },
    mutations: {
        SET_PRODUCTDATA(state, payload) {
            state.productData = payload
        }
    },
    actions: {
        //   获取全部栏目的数据
        async getAllProductData({
            commit
        }, payload) {
            let res = await get('/product/pageQuery', payload)
            commit('SET_PRODUCTDATA', res.data.data.list)
        }
    }
}